package com.zzyl.nursing.controller;

import com.zzyl.common.core.domain.R;
import com.zzyl.nursing.job.Content;
import com.zzyl.nursing.service.IDeviceDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class IotTestDataController {
    @Autowired
    private IDeviceDataService deviceDataService;
    @PostMapping("/data")
    public R saveIotDatatoCache(@RequestBody Content content){
        deviceDataService.batchInsertDeviceData(content);
        return R.ok();
    }
}
